﻿
package extremefx.tools {
	import flash.utils.getDefinitionByName;
	
	/**
	 * Gets a function definition by its name.
	 * @param pClassName The full qualified class name that holds the function
	 * @param pFunctionName The function name
	 * @return The requested function if it exists, null otherwise. 
	 */

	public function getFunctionByName(pClassName:String, pFunctionName:String):Function {
		try {
			var c:Class = getDefinitionByName(pClassName) as Class;
			return c ? c[pFunctionName] : null;
		} catch(e:Error) {
		}
		
		return null; 
	}
}
